/**
 * @File   : request.js
 * @Author : xue.xiaoBing
 * @Date   : 2020/11/4
 * @Desc   : 所有的action的dispatch,
 *           包括触发api后台的action和非后台的action。
 **/

import {api} from './api'
import * as action from 'src/redux/actions';


// 更改导航菜单
export const changeNavbar = (data) =>{
  return dispatch => {
    // 保存到local storage
    localStorage.setItem("navbar",data);
    // reducer 修改状态
    dispatch(action.changeNavbarMenu(data))
  }
};


//获取总人口
export const getTotalPerson = () => {
  return dispatch => {
    return api.reqGetTotalPersion()
  }
};

